/**
 * Description: 登录
 *
 * @author      Eden
 * @datetime    2016/11/25 09:30
 * @copyright   Beijing CmsTop Technology Co.,Ltd.
 */

(function () {
    "use strict";

    var api = {
        getCashInLists: '/money/cashin/getLists'
    };

    sm.controller('admin-cashin-list-controller', ['$scope', '$http', 'Modal', function ($scope, $http, Modal) {


        $scope.total = 0;
        $scope.nextPage = false;
        $scope.lists = [];
        $scope.getCashInLists = function() {
            $http.get(api.getCashInLists, {
                params: {
                    page: 1
                }
            }).success(function (res) {
                if (res.state) {
                    $scope.total = res.data.total;
                    $scope.nextPage = res.data.nextPage;
                    $scope.lists = res.data.data;
                } else {
                    // ...
                }
            });
        };

        $scope.getCashInLists();


    }]);

})();

